package com.coderman.common.lightmonitor.mapper;


import com.coderman.common.lightmonitor.entity.ServerServiceGCEntity;

import java.util.List;

/**
 * @Description:服务器进程表DAO接口
 * @Author：
 * @CreateTime：2019-09-10 11:14:28
 * @version v1.0
 */
public interface ServerServiceGCMapper {


    /**
	 *
	 * @Title: save
     * @Description:新增或修改
     * @author:
     * @param @param dto
     * @param @param userId
     * @return 当前插入记录id
     * @throws
     */
     Long insert(ServerServiceGCEntity Entity) throws Exception;

     /**
      *
      * @Title: delete
      * @Description: 通过id删除数据
      * @author:
      * @param @param id
      * @return 0/1    返回类型
      * @throws
      */
     int delete(long id)  throws Exception;

     /**
      *
      * @Title: getById
      * @Description: 通过id查询
      * @author:
      * @param @param id
      * @return ServerProcessorEntity   返回类型
      * @throws
      */
     ServerServiceGCEntity getById(Long id) throws Exception;




    /**
     * 根据服务器配置id获取服务器进程数据列表
     * @param serverConfigId
     * @return
     * @throws Exception
     */
    List<ServerServiceGCEntity> getByServerConfigId(Long serverConfigId) throws Exception;

    /**
     * 根据所属服务id，pid获取当前实例
     * @param serverConfigId
     * @param processId
     * @return
     * @throws Exception
     */
    ServerServiceGCEntity getByServerConfigIdAndProcessorId(Long serverConfigId, Long processId) throws Exception;




}